﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="iframe_productPriceList.aspx.cs"
    Inherits="PeisongWeb.admin.iframe_productPriceList" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%--<%@ Register TagName="sellerPrice" Src="controls/sellerPrice.ascx" TagPrefix="uc1" %>--%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <!--#include file="style.inc"-->
    <style type="text/css">
        html
        {
            overflow-x: hidden;
        }
        body
        {
            margin-left: 0px;
            margin-top: 0px;
        }
      </style>
</head>
<body style="background-color: #DFE8F6; width: 780px; overflow: auto; overflow-x: hidden;">
    <form id="form1" runat="server">
    <ext:ScriptManager ID="ScriptManager1" runat="server" />
    <asp:ScriptManager runat="server" ID="Sm1" EnableScriptGlobalization="true" EnableScriptLocalization="true" />
    <span style="font-size: 11pt;">(<a class="red">★</a>:表示今天有其它供应商报价)</span>
    <div id="admin-body" style="margin-left: 0; margin-top: 0; width: 780px;">
        <div id="admin_list_content" style="margin-left: 0; margin-top: 0; width: 780px;">
            <table cellpadding="0" cellspacing="0">
                <tr class="header-row">
                    <th>
                        等级
                    </th>
                    <th>
                        名 称
                    </th>
                    <th>
                        修改供应商
                    </th>
                    <th>
                        当前供应商价格
                    </th>
                    <th>
                        非自动加价商品价格修改
                    </th>
                </tr>
                <asp:Repeater ID="rpt_list" runat="server" OnItemCommand="rpt_list_ItemCommand">
                    <ItemTemplate>
                        <tr class='<%# Container.ItemIndex%2==0? "row-alt":"alt"  %>'>
                            <td align="center"><%#DataBinder.Eval(Container.DataItem,"className") %></td>
                            <td>
                                <a href="priceHistoryList.aspx?no=<%#Eval("productNo")%>&bn=<%#DataBinder.Eval(Container.DataItem,"businessNature") %>" target="_blank">
                                    <%#Eval("Name")%></a> <span class="red" style="<%#Convert.ToInt32(Eval("newPriceCount"))>0?"": "display:none"%>">
                                        ★</span>
                            </td>
                            <td>
                                <asp:LinkButton ID="LinkButton1" runat="server" CommandName="updateSeller" CommandArgument='<%# string.Format("{0},{1}", Eval("productId"), Eval("businessNature")) %>'
                                    CausesValidation="false">修改供应商</asp:LinkButton>
                            </td>
                            <td>
                                <span class="red">
                                    <%#Eval("currentSeller")%></span>
                            </td>
                            <td>
                                <span style="text-align: right; <%#Convert.ToBoolean(Eval("isAutoPrice"))||Eval("price")==DBNull.Value?"display:none;": ""%>">
                                    <asp:TextBox ID="txt_Price" runat="server" Width="80" ValidationGroup="MKE" Text=' <%# string.Format("{0:F2}", Eval("price"))%>'></asp:TextBox>
                                    <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="txt_Price"
                                        Mask="9999.99" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
                                        MaskType="Number" InputDirection="RightToLeft" AcceptNegative="Left" DisplayMoney="Left"
                                        ErrorTooltipEnabled="True" />
                                    <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator2" runat="server" ControlExtender="MaskedEditExtender2"
                                        ControlToValidate="txt_Price" IsValidEmpty="True" MaximumValue="9999" EmptyValueMessage="Number is required"
                                        InvalidValueMessage="数字无效" MaximumValueMessage="Number &gt; 12000" MinimumValueMessage="Number &lt; -100"
                                        MinimumValue="-100" Display="Dynamic" EmptyValueBlurredText="*" InvalidValueBlurredMessage="*"
                                        MaximumValueBlurredMessage="*" MinimumValueBlurredText="*" ValidationGroup="MKE" />
                                    <asp:LinkButton ID="LinkButton2" runat="server" CommandName="updatePrice" CommandArgument='<%# string.Format("{0},{1}", Eval("productId"), Eval("businessNature")) %>' CausesValidation="false">修改价格</asp:LinkButton>
                                    <asp:HiddenField ID="hd_ItemProductId" runat="server" Value='<%# Eval("productId") %>' />
                                    <asp:HiddenField ID="hd_busNature" runat="server" Value='<%# Eval("businessNature") %>' />
                                </span>
                                <span style="<%#Convert.ToBoolean(Eval("isAutoPrice"))&&Eval("price")!=DBNull.Value?"display:none;": "display:none;"%>">
                                    <%--<%# string.Format("{0:F2}", Eval("price"))%>--%>
                                </span>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        </div>
    </div>
    <ext:Window ID="win_Seller" runat="server" Title="选择供应商" Height="150px" Width="400px"
        BodyStyle="padding: 6px; background-color: #fff;" AutoScroll="true" Modal="True"
        Resizable="false" ShowOnLoad="false" Draggable="true" Icon="ApplicationViewDetail">
        <Body>
            <div>
                <h2>
                    <asp:Label runat="server" ID="lbl_productName"></asp:Label>
                </h2>
                <hr />
                <ul>
                    <li>
                        <label>
                            商品名称：</label>
                        <asp:Label runat="server" ID="lbl_Product">
                        </asp:Label>
                    </li>
                    <li>
                        <label>
                            其它供应商报价：</label>
                        <asp:DropDownList runat="server" ID="ddl_updateSeller" DataTextField="priceInfor"
                            DataValueField="psId">
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="请选择其它供应商报价"
                            ControlToValidate="ddl_updateSeller" Display="Dynamic"></asp:RequiredFieldValidator>
                    </li>
                    <li>
                        <label>
                            &nbsp; &nbsp;</label>
                        <asp:Button runat="server" ID="btn_updateSeller" Text="保存" OnClick="btn_updateSeller_Click" />
                        <input type="hidden" runat="server" id="hdUpdateProduct" />
                    </li>
                </ul>
            </div>
        </Body>
    </ext:Window>
    </form>
</body>
</html>
